#include <iostream>
#include "majestic.h"
#include <SFML/Window.hpp>
#include <SFML/Graphics.hpp>
using namespace std;
Majestic::Object::Object(int tx,int ty, const char *img)
{
    if(!Texture.LoadFromFile(img)) cout << img << " not found";
    spr.SetTexture(Texture);
    spr.SetPosition(tx,ty);
}
Majestic::Object::Object()
{

}
int Majestic::Object::getx()
{
	return spr.GetPosition().x;
}
int Majestic::Object::gety()
{
	return spr.GetPosition().y;
}
int Majestic::Object::getw()
{
    return spr.GetSize().x;
}
int Majestic::Object::geth()
{
    return spr.GetSize().y;
}
void Majestic::Object::setx(int tx)
{
	spr.SetX(tx);
}
void Majestic::Object::sety(int ty)
{
	spr.SetY(ty);
}
void Majestic::Object::setpos(int tx, int ty)
{
    spr.SetX(tx);
    spr.SetY(ty);
}
void Majestic::Object::move(int x, int y)
{
    spr.Move(x,y);
}
int Majestic::Object::setimg(const char *img)
{
        sf::Texture Texture;
        if(!Texture.LoadFromFile(img)) cout << img << " not found";
        spr.SetTexture(Texture);
}

int Majestic::Object::getid()
{
	return objectid;
}
void Majestic::Object::setid(int id)
{
	objectid = id;
}
sf::Sprite &Majestic::Object::getsprite()
{
    return spr;
}
